<?php
set_time_limit(120);


define("DIR",__DIR__);

require_once __DIR__.'/../app/bootstrap.php.cache';
//require_once __DIR__.'/../../app/AppKernel.php';

//use Symfony\Component\HttpFoundation\Request;

//$kernel = new AppCache(new AppKernel('prod', false));
//$kernel = new AppKernel('dev', false);


use Assetic\Asset\AssetCollection;
use Assetic\Asset\FileAsset;
//use Assetic\Asset\GlobAsset;
use Assetic\Filter\Yui\JsCompressorFilter;

$core = new AssetCollection(array(
	new FileAsset(__DIR__.'/jquery.elastic.js'),
	//new GlobAsset('/path/to/js/core/*.js'),
), array(
	new JsCompressorFilter(__DIR__.'/../app/java/yui.jar','java')
));
/*
$mtime = gmdate('D, d M y H:i:s',
$core->getLastModified()).' GMT';
if ($mtime == $_SERVER['HTTP_IF_MODIFIED_SINCE']) {
header('HTTP/1.0 304 Not Modified');
exit();
}
header('Content-Type: text/javascript');
*/
$core->load();
//header('Content-Type: text/javascript');
echo $core->dump();